import re
import math
argv = re.match("^\s*(\S*)\s*(.*)",msg['suffix'])
action = argv.group(1)
gid = msg['gid']
if action == "show":
    attr = argv.group(2)
    li = []
    dot = "\n"
    if attr:
        ans = "调查员们的"+attr+"如下——\n"
        for uid in msg['game'].pls:
            pc = getPlayerCard(uid, gid)
            val = pc[attr]
            if val:
                li.append(pc['__Name']+":"+str(val))
    else:
        ans = "调查员们状态如下——\n"
        for uid in msg['game'].pls:
            pc = getPlayerCard(uid,gid)
            max_hp = math.floor(((pc['体质'] or 0) + (pc['体型'] or 0))/10)
            max_san = math.floor(99 - (pc['克苏鲁神话'] or 0))
            mp = pc['魔法']
            mp_show = mp and mp!= math.floor((pc['意志'] or 0)/5) and (" mp:"+ str(mp) +"/"+ str(math.floor(pc['意志']/5))) or ""
            li.append(pc['__Name'] +" hp:"+ str(pc['生命'] or max_hp)+"/"+ str(max_hp) +" san:"+ str(pc['理智'] or pc['意志'] or '?')+"/"+str(max_san)+mp_show)
    msg.echo(ans + dot.join(li))